package lang;

import org.junit.Test;

import java.util.Arrays;

public class StringTest {
	public static void main(String[] args) {
		String haha = "abcdefg";
		System.out.println(haha.substring(0,haha.lastIndexOf("d")));
		String ss = "aa,bb,cc";
		String[] arr=new String[]{ss};
		System.out.println(Arrays.toString(arr)+",长度是："+arr.length);
	}

	@Test
	public void test01(){
		String pushServer = "rtmp://ws.uprtmp.m.51vv.com/live/yunzb-".replace("rtmp://", "");
		pushServer = pushServer.substring(0,pushServer.indexOf("/"));
		System.out.println(pushServer);
	}
	@Test
	public void test02(){
		System.out.println(String.format("%s[%s]", "创建订单失败", "支付中心下单失败"));
	}
}
